package tgc.edu.tms.repository;

import java.util.List;

import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import tgc.edu.tms.custom.CommonRepository;
import tgc.edu.tms.entity.SysDept;
@Repository
public interface SysDeptRepository extends CommonRepository<SysDept, Integer> {

	public List<SysDept> findByParentIsNullOrderByIdx1();

	@Query(value="SELECT * FROM sys_dept WHERE parent_id=?1",nativeQuery=true)
	public List<SysDept> findByParent_id(Integer id);

}
